from sqlalchemy import Column, Integer, String, Boolean

from app.db.database import Base


class Harp(Base):
    __tablename__ = "harp_index"
    id = Column(Integer, primary_key=True, index=True)
    harp_id = Column(Integer, index=True, nullable=True, unique=False)  # ID
    harp_name = Column(String(255))  # 名称
    harp_type = Column(String(255), unique=False)  # 属性
    harp_desc = Column(String(255))  # 描述


class Harps(Base):
    __tablename__ = "harps_groups"
    id = Column(Integer, primary_key=True, index=True)
    harp_type = Column(String(255), unique=False)  # 属性
    harp_name = Column(String(255))  # 名称
    harp_desc = Column(String(255))  # 描述
    audio_url = Column(String(255))  # 音频
    is_bax = Column(Boolean)  # 是否首字母
    harp_id = Harp.harp_id  # harp_id


class Sozluk(Base):
    __tablename__ = "sozluk"
    id = Column(Integer, primary_key=True, index=True)  # id
    harp_id = Harps.harp_id  # harp_id
    sozluk_data_1 = Column(String(255))  # 相关词1
    sozluk_data_1_audio_url = Column(String(255))  # 相关词1音频
    sozluk_data_2 = Column(String(255))  # 相关词2
    sozluk_data_2_audio_url = Column(String(255))  # 相关词2音频
    sozluk_data_3 = Column(String(255))  # 相关词3
    sozluk_data_3_audio_url = Column(String(255))  # 相关词3音频
    sozluk_data_4 = Column(String(255))  # 相关词4
    sozluk_data_4_audio_url = Column(String(255))  # 相关词4音频
